<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>Class Baidu\Duer\Botsdk\Nlu</title>

	<link rel="stylesheet" href="resources/style.css?c2f33731c1948fbed7c333554678bfa68d4817da">

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>


		<div id="groups">
				<h3>Namespaces</h3>
			<ul>
				<li class="active">
					<a href="namespace-Baidu.html">
						Baidu<span></span>
					</a>

						<ul>
				<li class="active">
					<a href="namespace-Baidu.Duer.html">
						Duer<span></span>
					</a>

						<ul>
				<li class="active">
					<a href="namespace-Baidu.Duer.Botsdk.html">
						Botsdk<span></span>
					</a>

						<ul>
				<li>
					<a href="namespace-Baidu.Duer.Botsdk.Card.html">
						Card					</a>

						</li>
				<li>
					<a href="namespace-Baidu.Duer.Botsdk.Directive.html">
						Directive<span></span>
					</a>

						<ul>
				<li>
					<a href="namespace-Baidu.Duer.Botsdk.Directive.AppLauncher.html">
						AppLauncher					</a>

						</li>
				<li>
					<a href="namespace-Baidu.Duer.Botsdk.Directive.AudioPlayer.html">
						AudioPlayer					</a>

						</li>
				<li>
					<a href="namespace-Baidu.Duer.Botsdk.Directive.WebBrowser.html">
						WebBrowser					</a>

						</li>
							</ul></li>
				<li>
					<a href="namespace-Baidu.Duer.Botsdk.Plugins.html">
						Plugins					</a>

						</li>
							</ul></li></ul></li></ul></li>
			</ul>
		</div>

		<hr>


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-Baidu.Duer.Botsdk.Bot.html">Bot</a></li>
				<li><a href="class-Baidu.Duer.Botsdk.Certificate.html">Certificate</a></li>
				<li><a href="class-Baidu.Duer.Botsdk.Intercept.html">Intercept</a></li>
				<li><a href="class-Baidu.Duer.Botsdk.Log.html">Log</a></li>
				<li class="active"><a href="class-Baidu.Duer.Botsdk.Nlu.html">Nlu</a></li>
				<li><a href="class-Baidu.Duer.Botsdk.Request.html">Request</a></li>
				<li><a href="class-Baidu.Duer.Botsdk.Response.html">Response</a></li>
				<li><a href="class-Baidu.Duer.Botsdk.Session.html">Session</a></li>
			</ul>


			<h3>Traits</h3>
			<ul>
				<li><a href="class-Baidu.Duer.Botsdk.DataObject.html">DataObject</a></li>
			</ul>



		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="">
		<input type="hidden" name="ie" value="UTF-8">
		<input type="text" name="q" class="text" placeholder="Search">
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="namespace-Baidu.Duer.Botsdk.html" title="Summary of Baidu\Duer\Botsdk"><span>Namespace</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class Nlu</h1>











	<div class="info">
		
		
		<b>Namespace:</b> <a href="namespace-Baidu.html">Baidu</a>\<a href="namespace-Baidu.Duer.html">Duer</a>\<a href="namespace-Baidu.Duer.Botsdk.html">Botsdk</a><br>
		

			<b>Located at</b> <a href="source-class-Baidu.Duer.Botsdk.Nlu.html#22-205" title="Go to source code">Nlu.php</a>
		<br>
	</div>



	<table class="summary methods" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="__construct" id="___construct">

		<td class="attributes"><code>
			 public 

			null
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___construct">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#41-47" title="Go to source code">__construct</a>( <span>array <var>$data</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			


				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$data</var></dt>
					<dd></dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					null
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="setSlot" id="_setSlot">

		<td class="attributes"><code>
			 public 

			null
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setSlot">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#49-72" title="Go to source code">setSlot</a>( <span>string <var>$field</var></span>, <span>string <var>$value</var></span>, <span>string <var>$index</var> = <span class="php-num">0</span></span> )</code>

		<div class="description short">
			<p>设置槽位</p>
		</div>

		<div class="description detailed hidden">
			<p>设置槽位</p>


				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$field</var></dt>
					<dd>槽位名</dd>
					<dt><var>$value</var></dt>
					<dd>槽位值</dd>
					<dt><var>$index</var></dt>
					<dd>第几组slot</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					null
				</div>


				<h4>Desc</h4>
				<div class="list">
						设置slot。如果不存在，新增一个slot<br>
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="getSlot" id="_getSlot">

		<td class="attributes"><code>
			 public 

			string
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getSlot">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#74-87" title="Go to source code">getSlot</a>( <span>string <var>$field</var></span>, <span> <var>$index</var> = <span class="php-num">0</span></span> )</code>

		<div class="description short">
			<p>获取槽位</p>
		</div>

		<div class="description detailed hidden">
			<p>获取槽位</p>


				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$field</var></dt>
					<dd>槽位名</dd>
					<dt><var>$index</var></dt>
					<dd></dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					string<br>槽位值
				</div>


				<h4>Desc</h4>
				<div class="list">
						获取一个slot对应的值<br>
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="getIntentName" id="_getIntentName">

		<td class="attributes"><code>
			 public 

			string
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getIntentName">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#90-97" title="Go to source code">getIntentName</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			



				<h4>Returns</h4>
				<div class="list">
					string
				</div>


				<h4>Desc</h4>
				<div class="list">
						获取当前的intent 名<br>
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="hasAsked" id="_hasAsked">

		<td class="attributes"><code>
			 public 

			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_hasAsked">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#99-108" title="Go to source code">hasAsked</a>( )</code>

		<div class="description short">
			<p>是否询问过用户</p>
		</div>

		<div class="description detailed hidden">
			<p>是否询问过用户</p>



				<h4>Returns</h4>
				<div class="list">
					boolean
				</div>


				<h4>Desc</h4>
				<div class="list">
						是否有询问用户<br>
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="ask" id="_ask">

		<td class="attributes"><code>
			 public 

			null
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_ask">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#110-127" title="Go to source code">ask</a>( <span>string|array <var>$slot</var></span> )</code>

		<div class="description short">
			<p>询问一个特定的槽位</p>
		</div>

		<div class="description detailed hidden">
			<p>询问一个特定的槽位</p>


				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$slot</var></dt>
					<dd>槽位名</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					null
				</div>


				<h4>Desc</h4>
				<div class="list">
						询问某些槽位。如果有询问一些槽位，表明多轮进行中<br>
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="toDirective" id="_toDirective">

		<td class="attributes"><code>
			 public 

			array
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_toDirective">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#129-139" title="Go to source code">toDirective</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			



				<h4>Returns</h4>
				<div class="list">
					array
				</div>


				<h4>Desc</h4>
				<div class="list">
						<p>打包NLU交互协议，返回DuerOS，为第二轮用户回答提供上下文
      在Response 中被调用</p><br>
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="toUpdateIntent" id="_toUpdateIntent">

		<td class="attributes"><code>
			 public 

			array
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_toUpdateIntent">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#153-163" title="Go to source code">toUpdateIntent</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			



				<h4>Returns</h4>
				<div class="list">
					array
				</div>


				<h4>Desc</h4>
				<div class="list">
						<p>bot可以修改intent中slot对应的值，返回给DuerOS更新
      在Response 中被调用</p><br>
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="setDelegate" id="_setDelegate">

		<td class="attributes"><code>
			 public 

			null
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setDelegate">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#165-175" title="Go to source code">setDelegate</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			



				<h4>Returns</h4>
				<div class="list">
					null
				</div>


				<h4>Desc</h4>
				<div class="list">
						设置delegate某个槽位或确认意图。<br>
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="setConfirmSlot" id="_setConfirmSlot">

		<td class="attributes"><code>
			 public 

			null
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setConfirmSlot">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#177-192" title="Go to source code">setConfirmSlot</a>( <span>string <var>$field</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			


				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$field</var></dt>
					<dd>槽位名</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					null
				</div>


				<h4>Desc</h4>
				<div class="list">
						设置对一个槽位的确认<br>
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="setConfirmIntent" id="_setConfirmIntent">

		<td class="attributes"><code>
			 public 

			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setConfirmIntent">#</a>
		<code><a href="source-class-Baidu.Duer.Botsdk.Nlu.html#194-204" title="Go to source code">setConfirmIntent</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			



				<h4>Returns</h4>
				<div class="list">
					
				</div>


				<h4>Desc</h4>
				<div class="list">
						设置confirm 意图。询问用户是否对意图确认，设置后需要自行返回outputSpeech<br>
				</div>


		</div>
		</div></td>
	</tr>
	</table>








	<table class="summary constants" id="constants">
	<caption>Constants summary</caption>
	<tr data-order="SLOT_NOT_UNDERSTAND" id="SLOT_NOT_UNDERSTAND">

		<td class="attributes"><code>string</code></td>
		<td class="name">
			<code>
				<a href="source-class-Baidu.Duer.Botsdk.Nlu.html#23-28" title="Go to source code"><b>SLOT_NOT_UNDERSTAND</b></a>
			</code>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

					<h4>Desc</h4>
					<div class="list">
							<p>一般处于多轮的服务，会对一个slot进行询问。
但是，会出现答非所问的情况，或者解析覆盖不到的地方
如果出现上述情况，解析会填这个字段, value为int，计数出现了多少次没理解用户说的query</p><br>
					</div>
			</div>
		</td>
		<td class="value">
			<div>
				<a href="#SLOT_NOT_UNDERSTAND" class="anchor">#</a>
				<code><span class="php-quote">&quot;da_system_not_understand&quot;</span></code>
			</div>
		</td>
	</tr>
	</table>










</div>

	<div id="footer">
		 API documentation generated by <a href="http://apigen.org">ApiGen</a>
	</div>
</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html>
